unit fmCustomModule;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Grids, DBGrids, DB, MemDS, DBAccess, Uni, BaseGrid, AdvGrid,
  DBAdvGrid, StdCtrls, GradientLabel, AdvPageControl, ComCtrls,
  AdvOfficePager, AdvOfficePagerStylers, AdvReflectionLabel, cxGraphics,
  cxControls, cxLookAndFeels, cxLookAndFeelPainters, dxSkinsCore,
  dxSkinOffice2007Black, dxSkinsdxStatusBarPainter, dxStatusBar;

type
  TCustomModuleForm = class(TForm)
    glbModuleCaption: TGradientLabel;
    lblModuleCaption: TAdvReflectionLabel;
    ModuleStatusBar: TdxStatusBar;
    procedure FormKeyPress(Sender: TObject; var Key: Char);
  private
    { Private declarations }
  protected
    procedure SetModuleCaption(ACaption: string);
  public
    { Public declarations }
  end;

implementation

uses
  DM;
  
{$R *.dfm}

{ TCustomModuleForm }

procedure TCustomModuleForm.SetModuleCaption(ACaption: string);
begin
  lblModuleCaption.HTMLText.Text :=
    Format('<FONT color="#FFA6AE" face="Arial Cyr" size="16">%s</FONT><FONT size="16" color="#FFFFFF" face="Arial Cyr">%s</FONT>',
      [Copy(ACaption, 1, 1), Copy(ACaption, 2, Length(ACaption) - 1)]);
end;

procedure TCustomModuleForm.FormKeyPress(Sender: TObject; var Key: Char);
begin
  if Key = #27 then
    ModalResult := mrCancel;
end;

end.
